//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <ddk.h>
#include <ostimer.h>
#include <bulverde.h>
#include <intcbits.h>
#include <drvpub.h>
#include "wtdog.h"

void watchdog_sn_feed()
{
	WATCHDOG_MSG(WDOG_MSG, kprintf("Watchdog: Would Feed.\n"));
	OSMR3 = OSCR + WTD_FEED_TIME_CLK;
    OWER = 0; /* Disable OSMR3 as watchdog timer */
}


/*
 *	Refresh the time stamp.
 */
void watchdog_sn_ping()
{
    if (OWER & OWER_WME) { /* If watchdog is already open, ping fail*/
        return;
    }
    OSMR3 = OSCR + WTD_FEED_TIME_CLK;/* Watchdog Timer Refresh*/
    OWER  |= OWER_WME; /* Enable OSMR3 as watchdog timer */
}



